﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PMQLNhaHang
{
    public partial class ucChucNang : UserControl
    {
        private Image _imageChucNang;
        public Image ImageChucNang
        {
            get { return _imageChucNang; }
            set { _imageChucNang = value; }
        }

        public string strTenChucNang
        {
            get { return _lbNoiDungChinh; }
            set { _lbNoiDungChinh = value; }
        }
        private string _lbNoiDungChinh;

        private string[] _dsChucNangCon;
        public string[] DsChucNangCon
        {
            get { return _dsChucNangCon; }
            set { _dsChucNangCon = value; }
        }

        public ucChucNang()
        {
            InitializeComponent();
            //KhoiTaoGiaTri();
        }
        private void KhoiTaoGiaTri()
        {
            if (!String.IsNullOrEmpty(strTenChucNang) && ImageChucNang != null&&DsChucNangCon!=null)
            {
                lbNoiDungChinh.Text = strTenChucNang;
                ptImage.Image = ImageChucNang;
                lbContent1.Text = DsChucNangCon[0];
                lbContent2.Text = DsChucNangCon[1];
            }
        }

        private void ucChucNang_Load(object sender, EventArgs e)
        {
            KhoiTaoGiaTri();
        }

        private void ucChucNang_Click(object sender, EventArgs e)
        {
           
        }

        private void label_Click(object sender, EventArgs e)
        {
            this.OnClick(new EventArgs());
        }
    }
}
